<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.7">
 <TITLE>SDCC Compiler User Guide: Floating point support</TITLE>
 <LINK HREF="SDCCUdoc-16.html" REL=next>
 <LINK HREF="SDCCUdoc-14.html" REL=previous>
 <LINK HREF="SDCCUdoc.html#toc15" REL=contents>
</HEAD>
<BODY>
<A HREF="SDCCUdoc-16.html">Next</A>
<A HREF="SDCCUdoc-14.html">Previous</A>
<A HREF="SDCCUdoc.html#toc15">Contents</A>
<HR>
<H2><A NAME="Float"></A> <A NAME="s15">15. Floating point support</A> </H2>

<P>SDCC supports IEEE (single precision 4bytes) floating point numbers.The
floating point support routines are derived from gcc's floatlib.c and consists
of the following routines. 
<P>
<UL>
<LI>_fsadd.c - add floating point numbers.</LI>
<LI>_fssub.c - subtract floating point numbers</LI>
<LI>_fsdiv.c - divide floating point numbers</LI>
<LI>_fsmul.c - multiply floating point numbers</LI>
<LI>_fs2uchar.c - convert floating point to unsigned char</LI>
<LI>_fs2char.c - convert floating point to signed char.</LI>
<LI>_fs2uint.c - convert floating point to unsigned int.</LI>
<LI>_fs2int.c - convert floating point to signed int.</LI>
<LI>_fs2ulong.c - convert floating point to unsigned long.</LI>
<LI>_fs2long.c - convert floating point to signed long.</LI>
<LI>_uchar2fs.c - convert unsigned char to floating point</LI>
<LI>_char2fs.c - convert char to floating point number</LI>
<LI>_uint2fs.c - convert unsigned int to floating point</LI>
<LI>_int2fs.c - convert int to floating point numbers</LI>
<LI>_ulong2fs.c - convert unsigned long to floating point number</LI>
<LI>_long2fs.c - convert long to floating point number.</LI>
</UL>
<P>Note if all these routines are used simultaneously the data space might
overflow. For serious floating point usage it is strongly recommended that
the Large model be used (in which case the floating point routines mentioned
above will need to recompiled with the --model-Large option)
<HR>
<A HREF="SDCCUdoc-16.html">Next</A>
<A HREF="SDCCUdoc-14.html">Previous</A>
<A HREF="SDCCUdoc.html#toc15">Contents</A>
</BODY>
</HTML>
